package com.mall.dao;

import com.mall.entity.ZhaoTongMallGoods;
import com.mall.entity.StockNumDTO;
import com.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ZhaoTongMallGoodsMapper {
    int deleteByPrimaryKey(Long goodsId);

    int insert(ZhaoTongMallGoods record);

    int insertSelective(ZhaoTongMallGoods record);

    ZhaoTongMallGoods selectByPrimaryKey(Long goodsId);

    ZhaoTongMallGoods selectByCategoryIdAndName(@Param("goodsName") String goodsName, @Param("goodsCategoryId") Long goodsCategoryId);

    int updateByPrimaryKeySelective(ZhaoTongMallGoods record);

    int updateByPrimaryKeyWithBLOBs(ZhaoTongMallGoods record);

    int updateByPrimaryKey(ZhaoTongMallGoods record);

    List<ZhaoTongMallGoods> findZhaoTongMallGoodsList(PageQueryUtil pageUtil);

    int getTotalZhaoTongMallGoods(PageQueryUtil pageUtil);

    List<ZhaoTongMallGoods> selectByPrimaryKeys(List<Long> goodsIds);

    List<ZhaoTongMallGoods> findZhaoTongMallGoodsListBySearch(PageQueryUtil pageUtil);

    int getTotalZhaoTongMallGoodsBySearch(PageQueryUtil pageUtil);

    int batchInsert(@Param("zhaoTongMallGoodsList") List<ZhaoTongMallGoods> zhaoTongMallGoodsList);

    int updateStockNum(@Param("stockNumDTOS") List<StockNumDTO> stockNumDTOS);

    int recoverStockNum(@Param("stockNumDTOS") List<StockNumDTO> stockNumDTOS);

    int batchUpdateSellStatus(@Param("orderIds")Long[] orderIds,@Param("sellStatus") int sellStatus);

}
